]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceAnimation: Block workspace updates during switch
authorTony Chen <contact@tycchen.com>
Tue, 2 Jun 2026 20:30:18 +0000 (16:30 -0400)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 29 Jun 2026 17:47:16 +0000 (19:47 +0200)
WorkspaceAnimation uses a fixed set of workspace indices to transition
between for each gesture/animation.

That means that if workspaces change during the animation, the mapping
from workspace adjustment value to the animation progress can involve
invalid indices and the animation ends on the wrong workspace.

To fix this, block workspace updates during the animation.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8148

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4014>
(cherry picked from commit eaa4e0577a08c3ed38b5f512b4af0b88ede7f1f5)

js/ui/workspaceAnimation.js

index db4050a2a18fa8b6947ed9a3b05470876fb099c1..f7c2f7a3bb4be4d5ff1537d1fc8971a447cc8802 100644 (file)
@@ -407,6 +407,7 @@ export class WorkspaceAnimationController {
             switchData.monitors.push(group);
         }
 
+        Main.wm.blockWorkspaceUpdates();
         global.compositor.disable_unredirect();
         this._grab = Main.pushModal(global.stage, {
             actionMode: Shell.ActionMode.NORMAL,
@@ -414,6 +415,7 @@ export class WorkspaceAnimationController {
     }
 
     _finishWorkspaceSwitch(switchData) {
+        Main.wm.unblockWorkspaceUpdates();
         global.compositor.enable_unredirect();
 
         if (this._grab) {